package com.example.administrator.myproject.order

import android.content.Intent
import android.os.Bundle
import android.support.v4.app.Fragment
import android.support.v7.widget.RecyclerView
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.widget.TextView

import com.example.administrator.myproject.R
import com.example.administrator.myproject.login.login22
import com.example.administrator.myproject.user.ShouAdapter

class OrderFragment : Fragment() {
    private var recyclerView: RecyclerView? = null
    private var adapter: ShouAdapter? = null
    private var textview: TextView? = null
    override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? {
        val view = inflater.inflate(R.layout.order, container, false)
        textview = view.findViewById(R.id.orderbutton) as TextView
        textview!!.setOnClickListener{
            val intent = Intent()
            intent.setClass(activity, login22::class.java)
            startActivity(intent)
        }
        return view
    }

//    override fun onResume() {
//        super.onResume()
//        val query = BmobQuery<Collect>()
//        query.order("-createdAt")
//        query.findObjects(object : FindListener<Collect>() {
//            override fun done(list: List<Collect>, e: BmobException?) {
//                if (e == null) {
//                    adapter!!.setData(list)
//                } else {
//                }
//            }
//        })
//    }
}
